Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDEV-3050 - Enhanced scriptprotect #1493

Open
wants to merge 4 commits into
base: 5.3
Choose a base branch
from

Conversation

Xcreen
Copy link
Contributor

@Xcreen Xcreen commented Dec 20, 2021

I changed the current scriptprotect implementation to a configurable regex (acf have this also in a config-file).
That way the user can configure the filter-regex.
The filter-regex is displayed in the admin.
Because of possible regression issues, I just took the current tag list as the regex filter.
In Lucee 6 we could change the filter to a more aggressive filter, something like this:

  <scriptprotect>
    <filter-regex value="&lt;s*(object|embed|script|applet|meta|svg|img|body|bgsound|input|video|isindex|iframe|audio|a)"/>
    <filter-regex value="(src|onabort|onactivate|onbeforeunload|onchange|onclick|oncontextmenu|oncopy|oncut|ondblclick|onload|onkeydown|onkeypress|onkeyuponload|onmousedown|onmouseenter|onmouseleave|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onresize|onstart|onstop|onsubmit|onunload)s*="/> <!-- Adjust this list -->
    <filter-regex value="(expression|eval)s*\("/>
  </scriptprotect>

https://luceeserver.atlassian.net/browse/LDEV-3050

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants